package smartcampus.scjava.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import smartcampus.scjava.POJO.DO.Equipment;
import smartcampus.scjava.mapper.EquipmentMapper;
import smartcampus.scjava.service.IEquipmentService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 器材表 服务实现类
 * </p>
 *
 * @author xian
 * @since 2023-12-05
 */
@Service
public class EquipmentServiceImpl extends ServiceImpl<EquipmentMapper, Equipment> implements IEquipmentService {

    @Override
    public Equipment getByEquipmentNo(String equipmentNo) {
        QueryWrapper<Equipment> queryWrapper = new QueryWrapper<>();
        queryWrapper.lambda().eq(Equipment::getEquipmentNo, equipmentNo);
        return getOne(queryWrapper);
    }
}
